<template>
  <div class="space">
    <div class="star-bound">
      <div class="main-star">
        <div class="item"
          v-for="(v, i) in stars"
          :key="i">
          <div class="other" :class="v.class" ></div>
          <div class="title">
            {{v.title}}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
export default {
  name: 'vueName',
  data () {
    return {
      stars: [
        {title: 'a', class: 'a'},
        {title: 'b', class: 'b'},
        {title: 'c', class: 'c'},
        {title: 'd', class: 'd'},
      ]
    }
  },
  methods: {

  }
}
</script>
 
<style scoped lang="scss">
  .space{
    position: relative;
    width: 100%;
    min-width: 1200px;
    height: 100%;
    min-height: 600px;
    top: 0px;
    left: 0px;
    z-index: 10;
    background: rgba(0, 0, 0, .9);
    .star-bound{
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 430px;
      height: 430px;
      border: 5px dotted #fff;
      border-radius: 50%;
      animation: starBound 5s linear 2s infinite alternate;
      transition: all 0.5s linear;
    }
    .main-star{
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 400px;
      height: 400px;
      border-radius: 50%;
      box-sizing: border-box;
      // padding: 5px;
      background-image: linear-gradient(130deg, #BCDCFF 0%, #409EFF 100%);
      overflow: hidden;
      transition: all 0.5s;
      display: flex;
      flex-flow: row wrap;
      justify-content: center;
      align-self: center;
      align-items: center;
      .item {
        position: relative;
        width: 50%;
        height: 50%;
        .other{
          position: absolute;
          top: 0;
          left: 0;
          z-index: 5;
          width: 100%;
          height: 100%;
          background-image: linear-gradient(130deg, #1c5fa9 0%, #409EFF 100%);
        }
        .title{
          position: absolute;
          top: 0;
          left: 0;
          z-index: 10;
          width: 100%;
          height: 100%;
          display: flex;
          justify-content: center;
          align-items: center;
        }
      }
      .a{}
      .b{
        transform: rotate(90deg)
      }
      .c{
        transform: rotate(-90deg)
      }
      .d{
        transform: rotate(180deg)
      }
    }
    @keyframes starBound {
      0% {
        width: 430px;
        height: 430px;
        border: 5px dotted #fff;
      }
      100% {
        width: 480px;
        height: 480px;
        border: 10px dotted #000;
      }
    }
  }
</style>